<div class="am-u-sm-12 widget main-w" >
	<ol class="am-breadcrumb">
		<li><a href="{:url('/admin/index')}">首页</a></li>
		<li><a href="{:url('/admin/menu/index')}">系统管理</a></li>
		<li class="am-active">菜单</li>
	</ol>
	<div style="width:100%;height: 100%;">
	<div class="am-u-sm-12  cl-p" >
		<div class="am-u-sm-12">
			<form class="am-form-inline tpl-form-border-form cl-p">
				<div class="widget am-u-sm-12 cl-p">
					<div class="am-u-sm-12 am-form-group">
						<div class="am-fr">
						<button type="button" class="sort am-btn am-btn-primary am-btn-sm"><i class="am-icon-sort"></i>排序</button>
						<button type="button" class="save am-btn am-btn-primary am-btn-sm" style="display: none;"><i class="am-icon-keep"></i>保存</button>
						</div>
						<table width="100%" class="am-table am-table-compact am-text-nowrap tpl-table-black ">
							<thead>
								<tr> 
									<th>菜单名</th>
									<th>路径</th>
									<th>状态</th>
									<th>图标</th>
									<th>操作</th>
									
								</tr>
							</thead>
							<tbody class="sortable">
								{foreach $tree as $key => $item}
								
								<tr data-id="{$item.id}">
									<td>{:str_repeat('├ ', $item.level)} {$item.name}</td>
									<td>{$item.url}</td>
									<td>{$item.state}</td>
									<td><i class="am-icon-{$item.icon} sidebar-nav-link-logo"></i></td>
									<td>
										<div class="tpl-table-black-operation">
											 {if $item.state == 9}
												<a href="javascript:;" class="startusing" data-method="startusing">
													<i class="am-icon-pencil"></i> 启用
												</a>
												{else/}
												<a href="javascript:;" class="tpl-table-black-operation-del forbidden" data-method="forbidden">
													<i class="am-icon-trash"></i> 禁用
												</a>
												{/if}
											<a href="{:url('edit',['id'=>$item.id])}">
												<i class="am-icon-pencil"></i> 编辑
											</a>
											<a href="javascript:;" class="tpl-table-black-operation-del delete-list" data-method="delete">
												<i class="am-icon-pencil"></i> 删除
											</a>
										</div>
									</td>
								</tr>
								{/foreach}
							</tbody>
						</table>
					</div>
					<div class="am-u-sm-12">
						<a href="/admin/menu/add" class="am-btn am-btn-primary am-radius" style="margin-top: -2px;">添加菜单</a>
					</div>
				</div>
			</form>
		</div>
	</div>
	</div>
</div>
<script src="{$static_dir}/assets/js/jquery-ui.js"></script>